<template>
  <h1>click埋点</h1>
  <div v-tc="['eventName', 'val1']" @click="() => console.log('click')">
    DOM元素click事件
  </div>
  <s-button
    v-tc="['button-components', 'val1', 'val2']"
    @click="() => console.log('click')"
  >
    测试组件click事件
  </s-button>
  <h1>input埋点</h1>
  <input type="text" v-model="testModel" v-ti />
  <el-input v-model="testModel" v-ti />
  <h1>pv,uv统计</h1>
  <RouterLink to="/">
    <button>pro-components</button>
  </RouterLink>
  <h1>元素进入视口统计</h1>
  <h1 v-for="item in list" :key="item" v-tv="[`el${item}`]">
    {{ item }}
  </h1>
</template>
<script lang="ts" setup>
import { ref } from 'vue'

defineOptions({
  name: 's-tracker',
})
const testModel = ref('test')

const list = ref<number[]>([])
for (let index = 0; index < 100; index++) {
  list.value.push(index)
}
</script>
